// Programming_Scala/src/ch13/shapes-drawing-factory-script.scala

import shapes2._

val p00 = new Point( 0.0, 0.0 )
val p10 = new Point( 1.0, 0.0 )
val p01 = new Point( 0.0, 1.0 )

val list = List(
  ShapeFactory.makeShape( "circle", p00, 5.0 ),
  ShapeFactory.makeShape( "rectangle", p00, 2.0, 3.0 ),
  ShapeFactory.makeShape( "triangle", p00, p10, p01 )
)

list.foreach { _.draw }
